// This source is subject to the Microsoft Public License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace QuoteAdvantageEditor
{
	/// <summary>
	/// Summary description for AddChildItemDlg.
	/// </summary>
	public class AddChildItemDlg : System.Windows.Forms.Form
	{
      private string strItemType;

      private System.Windows.Forms.Button btnOK;
      private System.Windows.Forms.Button btnCancel;
      private System.Windows.Forms.Label label1;
      private System.Windows.Forms.GroupBox groupBox1;
      private System.Windows.Forms.RadioButton btnRule;
      private System.Windows.Forms.RadioButton btnChildProduct;
      private System.Windows.Forms.RadioButton btnCategory;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;
      
      public string ItemType
      {
         get { return strItemType; }
      }

		public AddChildItemDlg()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
         this.btnOK = new System.Windows.Forms.Button();
         this.btnCancel = new System.Windows.Forms.Button();
         this.label1 = new System.Windows.Forms.Label();
         this.groupBox1 = new System.Windows.Forms.GroupBox();
         this.btnRule = new System.Windows.Forms.RadioButton();
         this.btnChildProduct = new System.Windows.Forms.RadioButton();
         this.btnCategory = new System.Windows.Forms.RadioButton();
         this.groupBox1.SuspendLayout();
         this.SuspendLayout();
         // 
         // btnOK
         // 
         this.btnOK.Location = new System.Drawing.Point(224, 16);
         this.btnOK.Name = "btnOK";
         this.btnOK.Size = new System.Drawing.Size(80, 23);
         this.btnOK.TabIndex = 0;
         this.btnOK.Text = "OK";
         this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
         // 
         // btnCancel
         // 
         this.btnCancel.Location = new System.Drawing.Point(224, 48);
         this.btnCancel.Name = "btnCancel";
         this.btnCancel.Size = new System.Drawing.Size(80, 23);
         this.btnCancel.TabIndex = 1;
         this.btnCancel.Text = "Cancel";
         this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
         // 
         // label1
         // 
         this.label1.Location = new System.Drawing.Point(12, 20);
         this.label1.Name = "label1";
         this.label1.Size = new System.Drawing.Size(144, 16);
         this.label1.TabIndex = 2;
         this.label1.Text = "Type of Item to Add:";
         // 
         // groupBox1
         // 
         this.groupBox1.Controls.Add(this.btnRule);
         this.groupBox1.Controls.Add(this.btnChildProduct);
         this.groupBox1.Controls.Add(this.btnCategory);
         this.groupBox1.Controls.Add(this.label1);
         this.groupBox1.Location = new System.Drawing.Point(8, 8);
         this.groupBox1.Name = "groupBox1";
         this.groupBox1.Size = new System.Drawing.Size(204, 140);
         this.groupBox1.TabIndex = 3;
         this.groupBox1.TabStop = false;
         // 
         // btnRule
         // 
         this.btnRule.Location = new System.Drawing.Point(32, 100);
         this.btnRule.Name = "btnRule";
         this.btnRule.TabIndex = 5;
         this.btnRule.Text = "Rule";
         // 
         // btnChildProduct
         // 
         this.btnChildProduct.Location = new System.Drawing.Point(32, 72);
         this.btnChildProduct.Name = "btnChildProduct";
         this.btnChildProduct.TabIndex = 4;
         this.btnChildProduct.Text = "Child Product";
         // 
         // btnCategory
         // 
         this.btnCategory.Checked = true;
         this.btnCategory.Location = new System.Drawing.Point(32, 44);
         this.btnCategory.Name = "btnCategory";
         this.btnCategory.TabIndex = 3;
         this.btnCategory.TabStop = true;
         this.btnCategory.Text = "Category";
         // 
         // AddChildItemDlg
         // 
         this.AcceptButton = this.btnOK;
         this.AutoScaleBaseSize = new System.Drawing.Size(5, 14);
         this.ClientSize = new System.Drawing.Size(314, 160);
         this.Controls.Add(this.groupBox1);
         this.Controls.Add(this.btnCancel);
         this.Controls.Add(this.btnOK);
         this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
         this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
         this.MaximizeBox = false;
         this.MinimizeBox = false;
         this.Name = "AddChildItemDlg";
         this.ShowInTaskbar = false;
         this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
         this.Text = "Add Item";
         this.Load += new System.EventHandler(this.ChildProductDlg_Load);
         this.groupBox1.ResumeLayout(false);
         this.ResumeLayout(false);

      }
		#endregion

      private void btnOK_Click(object sender, System.EventArgs e)
      {
         if (btnCategory.Checked)
            strItemType = "Category";
         else if (btnChildProduct.Checked)
            strItemType = "ChildProduct";
         else
            strItemType = "Rule";

         this.DialogResult = DialogResult.OK;
         this.Close();
      }

      private void btnCancel_Click(object sender, System.EventArgs e)
      {
         this.Close();      
      }

      private void ChildProductDlg_Load(object sender, System.EventArgs e)
      {
      
      }

 
	} // end class
}
